/*
 * buzzer_hal.c
 *
 * Created: 8/16/2013 11:09:43 AM
 *  Author: Ken Arok
 *
 *      Revision history:
 *      ---------------------------------------------------------
 *      Date			|	Revised by		|	Description
 *      ---------------------------------------------------------
 *      1. Aug 16, 2013	|	Yosef			| New establishment
 *
 *
 * \file
 *
 * \brief Hardware Abstraction Layer of Buzzer.
 *
 * Copyright (c) 2013 PT Hanindo Automation Solutions. All rights reserved.
 *
 */

#include "config_board.h"

#if BOARD_1_0_USED

#include "board.h"
#include "tc.h"
#include "buzzer_hal.h"

/** \brief Turn PS1240P02BT Buzzer ON.
 */ 
static void ps1240p02bt_buzzer_on(void)
{
	tc_start(TC0, BUZZER_CHANNEL);
}

/** \brief Turn PS1240P02BT Buzzer OFF.
 */ 
static void ps1240p02bt_buzzer_off(void)
{
	tc_stop(TC0, BUZZER_CHANNEL);
}

/* ---------------------------------------------------------------------- */
void buzzer_on(void)
{
	ps1240p02bt_buzzer_on();
}

void buzzer_off(void)
{
	ps1240p02bt_buzzer_off();
}

#endif /* BOARD_1_0_USED */